Test a Create or Delete Procedure
This page last changed on Nov 28, 2008.
How To Test a Create or Delete ProcedureThis topic describes how to test a create procedure or delete procedure in a logical data service. OverviewTesting a create or delete procedure shows you how data is inserted into or deleted from physical data sources. A create or delete can insert data into or delete it from multiple physical data sources, of the same or different types. If possible, you should test a create or delete procedure on sample data first, before you test on live physical data sources. A create procedure usually takes a complex type argument of the service's return type, and returns a key value as a result. You can see the procedure's argument and return type by right-clicking the procedure in the Overview tab and choosing Edit Signature. A Create Procedure SignatureYou can see the element (or elements) defined in the return key in the update map. The Return Key of a Create ProcedureFor relational sources, the return key value is generated using either identity or sequence, depending on how the relational table was created. A delete procedure also takes a complex argument, usually the service's return type or a key, but it often does not return a value. A Delete Procedure SignatureOracle Data Service Integrator sequences the updates done by create and delete procedures to ensure referential integrity, in that:
Edit a Complex Parameter in Test ViewTo test the create or delete procedure, you can edit the fields of the XML complex type provided in Test view, or you can browse for an XML document that contains a template with the required data. To test a create or delete procedure using an XML template:
If you are testing a Create procedure, you will see the key data displayed in the Result pane. The Returned Key ValueWhen You Enter DataWhether you edit data values directly in the XML template provided in the Test tab or browse for an XML document, be careful to:
Use the Result of a Read FunctionIf the XML argument is complex and you do not want to enter all necessary values in the Test tab or create an XML document, you can also run one of the service's Read functions and copy the data from the result. To test a create or delete procedure using the result of a read function:
This is an example of a data record returned by a Read function, which you can copy from the Text view: <?xml version="1.0" encoding="UTF-8"?> <cus:CUSTOMER_PROFILE xmlns:cus="ld:logical/CustomerProfile"> <CUSTOMER> <CUSTOMER_ID>CUSTOMER9</CUSTOMER_ID> <FIRST_NAME>Hommer</FIRST_NAME> <LAST_NAME>Simpson</LAST_NAME> <EMAIL_ADDRESS>JOHN_9@yahoo.com</EMAIL_ADDRESS> <ADDRESS> <ADDR_ID>ADDR_9_0</ADDR_ID> <CUSTOMER_ID>CUSTOMER9</CUSTOMER_ID> <STREET_ADDRESS1>179 Rose Avenue</STREET_ADDRESS1> <STREET_ADDRESS2>NULL</STREET_ADDRESS2> <CITY>Las Vegas</CITY> <STATE>NV</STATE> <ZIPCODE>89502</ZIPCODE> <COUNTRY>USA</COUNTRY> </ADDRESS> <CREDITRATING> <CUSTOMER_ID>CUSTOMER9</CUSTOMER_ID> <RATING>600</RATING> </CREDITRATING> </CUSTOMER> </cus:CUSTOMER_PROFILE> Be sure to remove:
See AlsoConceptsHow Tos
|
![]() |
Document generated by Confluence on Jan 13, 2009 15:57 |